Open
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates all packages and migrates to Prisma 6.18.0, which introduces significant configuration changes. The migration switches from the prisma-client-js generator to the new prisma-client generator, requiring adjustments to TypeScript configuration, module handling, and environment variable loading.
Key changes:
- Upgraded Prisma from 6.17.1 to 6.18.0 and adopted the new
prisma-clientgenerator withprisma.config.ts - Configured ES modules support by setting
"type": "module"in package.json and updating script commands to use--env-fileflag - Enabled TypeScript declaration file generation and removed
allowJsoption since the new generator produces TypeScript files
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| backend/tsconfig.json | Enabled declaration and declarationMap for TypeScript definitions; removed allowJs since Prisma now generates TypeScript files |
| backend/prisma/schema.prisma | Updated generator provider from prisma-client-js to prisma-client |
| backend/prisma.config.ts | Added new Prisma configuration file with dotenv import for environment variable loading |
| backend/package.json | Added ES module support, updated scripts with --env-file flag, upgraded Prisma packages to 6.18.0, added dotenv dependency |
| backend/package-lock.json | Updated package lock with new dependency versions |
| backend/main.ts | Updated Prisma Client import path from index.js to client.js |
| README.md | Updated installation instructions and removed outdated tsconfig guidance about allowJs |
Files not reviewed (1)
- backend/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
chelproc
approved these changes
Nov 30, 2025
2f52b75 to
26f8de1
Compare
Collaborator
Author
|
あ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
すべてのパッケージをアップデートし、Prisma 6.18.0に対応しました。
prisma db pushの際に自動でprismaと@prisma/clientがインストールされていましたが、Prisma 6.18.0以降は事前にこれらをインストールしておく必要があるようになったようです。prisma initをした際に生成されるファイルでprisma.config.tsが使用されるようになりました。cf. https://www.prisma.io/blog/announcing-prisma-6-18-0#init-with-prismaconfigts-automaticallyprisma initをした際に生成されるファイルでは、prisma-client-jsgeneratorではなくprisma-clientgeneratorが使用されるようになったようです。prisma-clientgeneratorを使用することで、.envファイルが自動で読み込まれなくなりました。(cf. https://www.prisma.io/docs/orm/prisma-schema/overview/generators#prisma-client )TypeScriptファイルやJavaScriptファイルを実行する際には、--env-file=.envなどによって.envファイルを読み込む必要があります。(cf. https://www.prisma.io/docs/orm/reference/prisma-config-reference#using-environment-variables )prisma db pushをする際などのために、prisma.config.ts内でdotenvを使用する必要があるのではないかと考えられます。prisma-clientgeneratorでは、prisma generateをした際にTypeScriptファイルが生成されるため、tsconfig.jsonでallowJsオプションをtrueにする必要がなくなりました。 cf. https://www.prisma.io/docs/orm/prisma-schema/overview/generators#prisma-clientprisma-clientgeneratorを使用することで、Prisma Clientのインポート方法が変わりました。 cf. https://www.prisma.io/docs/orm/prisma-schema/overview/generators#importing-prisma-clientprisma.config.tsファイルの拡張子が.tsであり動かすには、拡張子を.mtsにする必要が出てきたため、package.jsonのtypeフィールドをmoduleにしました。